﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<skags.Models.ProfileSettingsViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Stillingarnar mínar
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="navigation">
<% Html.RenderPartial("IndexNavigation"); %>
</div>
<div id="content">
    <%: Html.ValidationSummary(true) %>
    <% using (Html.BeginForm()) {%>
    <fieldset>
    <legend>Prófílupplýsingarnar mínar</legend>
        <div class="editor-label">
                Fullt nafn:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Info.FullName)%>
                <%: Html.ValidationMessageFor(model => model.Info.FullName)%>
        </div>

        <div class="editor-label">
                Netfang:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Info.Email)%>
                <%: Html.ValidationMessageFor(model => model.Info.Email)%>
        </div>

        <div class="editor-label">
                Slóð á Facebook síðu:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Info.FacebookUrl)%>
                <%: Html.ValidationMessageFor(model => model.Info.FacebookUrl)%>
        </div>

        <div class="editor-label">
                Heimilisfang:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Info.Address)%>
                <%: Html.ValidationMessageFor(model => model.Info.Address)%>
        </div>

        <div class="editor-label">
                Póstnúmer (einungis tölur):
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Info.ZipCode)%>
                <%: Html.ValidationMessageFor(model => model.Info.ZipCode)%>
        </div>

        <div class="editor-label">
                Lýsingin mín:
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.Info.Description)%>
                <%: Html.ValidationMessageFor(model => model.Info.Description)%>
        </div>

        <p>
                <input type="submit" value="Vista" />
            </p>

        </fieldset>
        <fieldset>
            <legend>Prófílstillingarnar mínar</legend>
            
            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.PrivacySettings.ShowEmail) %>
                <span class="editor-label">
                    Sýna netfang?
                </span>
                <%: Html.ValidationMessageFor(model => model.PrivacySettings.ShowEmail) %>
            </div>
            
            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.PrivacySettings.ShowAddress) %>
                <span class="editor-label">
                    Sýna heimilisfang?
                </span>
                <%: Html.ValidationMessageFor(model => model.PrivacySettings.ShowAddress) %>
            </div>
            
            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.PrivacySettings.ShowNumOfChildren) %>
                <span class="editor-label">
                    Sýna fjölda barna?
                </span>
                <%: Html.ValidationMessageFor(model => model.PrivacySettings.ShowNumOfChildren) %>
            </div>
            
            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.PrivacySettings.ShowChildrenNames) %>
                <span class="editor-label">
                    Sýna nöfn barna?
                </span>
                <%: Html.ValidationMessageFor(model => model.PrivacySettings.ShowChildrenNames) %>
            </div>

            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.PrivacySettings.Subscription) %>
             <span class="editor-label">
                Viltu gerast áskrifandi að nýju efni síðunnar?
            </span>
                <%: Html.ValidationMessageFor(model => model.PrivacySettings.Subscription) %>
            </div>
            
            <p>
                <input type="submit" value="Vista" />
            </p>
        </fieldset>
    <% } %>
    <form action="UploadProfilePic" method="post" enctype="multipart/form-data">
    <input type="hidden" name="userid" id="userid" value="<%= ViewData["UserID"] %>" />
    <fieldset>
    <legend>Prófílmynd:</legend>
    <input type="file" name="file" id="file" value="profilepic" />
    <input type="submit" value="Hlaða upp"/>
    <br /><br />
    <img src="<%= Url.Content("~/Content/users/user_" + ViewData["UserID"] + ".jpg") %>" alt="Prófílmynd" />
        </fieldset>
    </form>
</div>
</asp:Content>
